package com.cc.model.convert

import com.cc.model.DiScript
import com.cc.model.dto.DiScriptDto
import org.mapstruct.*

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE, componentModel = MappingConstants.ComponentModel.SPRING)
abstract class DiScriptConvert {

    abstract fun toEntity(diScriptDto: DiScriptDto): DiScript

    abstract fun toDto(diScript: DiScript): DiScriptDto

    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    abstract fun partialUpdate(diScriptDto: DiScriptDto, @MappingTarget diScript: DiScript): DiScript
}